package com.shujia.wyh.day14.danlidemo2;

public class Student {

    private static Student student;
    private Student(){}

    //t1,t2,t3
    public synchronized static Student getStudent(){
        if(student==null){
            //t1,t2,t3
            student = new Student();
        }else{
            return student;
        }
        return student;
    }
}
